﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Classes
{
    public class City
    {
        private String name;
        private String country { get; set; }
        private IList<City> citiesThatAreConnected { get; set; }
        private IList<Flight> flightList;
        private bool _mark;


        public City()
        {

        }
        public City(String name, String country)
        {
            _mark = false;
            this.name = name;
            this.country = country;
            flightList = new List<Flight>();
        }

        public IList<Flight> Flights() //must return a List in order to be able to remove edges
        {
            return flightList;
        }

        public void AddFlight(City to)
        {
            Flight f = new Flight(this, to);
            flightList.Add(f);
        }

        public int OutDegree()
        {
            return flightList.Count;
        }

        public void RemoveFlight(Flight f)
        {
            flightList.Remove(f);
        }
        public String Country
        {
            get
            {
                return country;
            }
            set
            {
                country = value;
            }
        }
        public bool Mark
        {
            get
            {
                return _mark;
            }
            set
            {
                _mark = value;
            }
        }
        public String Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }

    }
}